<template>
    <el-card class="box-card" shadow="never">
        <div slot="header">
            <span>❀ 发帖</span>
        </div>
        <div v-if="token != null && token !== ''" class="has-text-centered">
            <b-button type="is-danger" tag="router-link" :to="{path:'/post/create'}" outlined>
                ✍表达想法
            </b-button>

        </div>
        <div v-else class="has-text-centered">
            <b-button type="is-primary" tag="router-link" :to="{path:'/register'}" outlined>
                马上入驻
            </b-button>
            <b-button type="is-danger" tag="router-link" :to="{path:'/login'}" outlined class="ml-2">
                社区登录
            </b-button>
        </div>
    </el-card>
</template>

<script>
    import { mapGetters } from 'vuex'


    export default {
        name: 'LoginWelcome',
        computed: {
            //可以使用store下的token
            ...mapGetters([
                'token'
            ])
        },
        data() {
            return {
            }
        },
        //在页面开始加载的时候
        created(){

        },
        methods: {

        }
    }
</script>
